home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / NetSprocket.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  16.2 KB  |  585 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        NetSprocket.h
  3.  
  4.      Contains:    Games Sprockets: NetSprocket interfaces
  5.  
  6.      Version:    Technology:    NetSprocket 1.7
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1996-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __NETSPROCKET__
  18. #define __NETSPROCKET__
  19.  
  20. #ifndef __CONDITIONALMACROS__
  21.     #include <ConditionalMacros.h>
  22. #endif
  23.  
  24. #ifndef __MACTYPES__
  25.     #include <MacTypes.h>
  26. #endif
  27.  
  28. #ifndef __EVENTS__
  29.     #include <Events.h>
  30. #endif
  31.  
  32. #ifndef __OPENTRANSPORT__
  33.     #include <OpenTransport.h>
  34. #endif
  35.  
  36. #ifndef __OPENTRANSPORTPROVIDERS__
  37.     #include <OpenTransportProviders.h>
  38. #endif
  39.  
  40. #ifndef __MACERRORS__
  41.     #include <MacErrors.h>
  42. #endif
  43.  
  44.  
  45.  
  46.  
  47. #if PRAGMA_ONCE
  48. #pragma once
  49. #endif
  50.  
  51. #ifdef __cplusplus
  52. extern "C" {
  53. #endif
  54.  
  55. #if PRAGMA_IMPORT
  56. #pragma import on
  57. #endif
  58.  
  59. #if PRAGMA_STRUCT_ALIGN
  60.     #pragma options align=power
  61. #elif PRAGMA_STRUCT_PACKPUSH
  62.     #pragma pack(push, 2)
  63. #elif PRAGMA_STRUCT_PACK
  64.     #pragma pack(2)
  65. #endif
  66.  
  67. #if TARGET_OS_MAC
  68. enum {
  69.     kNSpMaxPlayerNameLen        = 31,
  70.     kNSpMaxGroupNameLen            = 31,
  71.     kNSpMaxPasswordLen            = 31,
  72.     kNSpMaxGameNameLen            = 31,
  73.     kNSpMaxDefinitionStringLen    = 255
  74. };
  75.  
  76.  
  77. /* NetSprocket basic types */
  78. typedef struct OpaqueNSpGameReference*     NSpGameReference;
  79. typedef struct OpaqueNSpProtocolReference*  NSpProtocolReference;
  80. typedef struct OpaqueNSpProtocolListReference*  NSpProtocolListReference;
  81. typedef struct OpaqueNSpAddressReference*  NSpAddressReference;
  82. typedef SInt32                             NSpEventCode;
  83. typedef SInt32                             NSpGameID;
  84. typedef SInt32                             NSpPlayerID;
  85. typedef NSpPlayerID                     NSpGroupID;
  86. typedef UInt32                             NSpPlayerType;
  87. typedef SInt32                             NSpFlags;
  88. typedef Str31                             NSpPlayerName;
  89. /* Individual player info */
  90.  
  91.     struct NSpPlayerInfo {
  92.         NSpPlayerID                     id;
  93.         NSpPlayerType                     type;
  94.         Str31                             name;
  95.         UInt32                             groupCount;
  96.         NSpGroupID                         groups[1];
  97.     };
  98.     typedef struct NSpPlayerInfo NSpPlayerInfo;
  99.     
  100. typedef NSpPlayerInfo *                    NSpPlayerInfoPtr;
  101. /* list of all players */
  102.  
  103. struct NSpPlayerEnumeration {
  104.     UInt32                             count;
  105.     NSpPlayerInfoPtr                 playerInfo[1];
  106. };
  107. typedef struct NSpPlayerEnumeration        NSpPlayerEnumeration;
  108. typedef NSpPlayerEnumeration *            NSpPlayerEnumerationPtr;
  109. /* Individual group info */
  110.  
  111. struct NSpGroupInfo {
  112.     NSpGroupID                         id;
  113.     UInt32                             playerCount;
  114.     NSpPlayerID                     players[1];
  115. };
  116. typedef struct NSpGroupInfo                NSpGroupInfo;
  117. typedef NSpGroupInfo *                    NSpGroupInfoPtr;
  118. /* List of all groups */
  119.  
  120. struct NSpGroupEnumeration {
  121.     UInt32                             count;
  122.     NSpGroupInfoPtr                 groups[1];
  123. };
  124. typedef struct NSpGroupEnumeration        NSpGroupEnumeration;
  125. typedef NSpGroupEnumeration *            NSpGroupEnumerationPtr;
  126. /* Topology types */
  127.  
  128. typedef UInt32                             NSpTopology;
  129. enum {
  130.     kNSpClientServer            = 0x00000001
  131. };
  132.  
  133. /* Game information */
  134.  
  135. struct NSpGameInfo {
  136.     UInt32                             maxPlayers;
  137.     UInt32                             currentPlayers;
  138.     UInt32                             currentGroups;
  139.     NSpTopology                     topology;
  140.     UInt32                             reserved;
  141.     Str31                             name;
  142.     Str31                             password;
  143. };
  144. typedef struct NSpGameInfo                NSpGameInfo;
  145. /* Structure used for sending and receiving network messages */
  146. struct NSpMessageHeader {
  147.     UInt32                             version;                    /* Used by NetSprocket.  Don't touch this */
  148.     SInt32                             what;                        /* The kind of message (e.g. player joined) */
  149.     NSpPlayerID                     from;                        /* ID of the sender */
  150.     NSpPlayerID                     to;                            /* (player or group) id of the intended recipient */
  151.     UInt32                             id;                            /* Unique ID for this message & (from) player */
  152.     UInt32                             when;                        /* Timestamp for the message */
  153.     UInt32                             messageLen;                    /* Bytes of data in the entire message (including the header) */
  154. };
  155. typedef struct NSpMessageHeader NSpMessageHeader;
  156. /* NetSprocket-defined message structures */
  157.  
  158. struct NSpErrorMessage {
  159.     NSpMessageHeader                 header;
  160.     OSStatus                         error;
  161. };
  162. typedef struct NSpErrorMessage            NSpErrorMessage;
  163.  
  164. struct NSpJoinRequestMessage {
  165.     NSpMessageHeader                 header;
  166.     Str31                             name;
  167.     Str31                             password;
  168.     UInt32                             theType;
  169.     UInt32                             customDataLen;
  170.     UInt8                             customData[1];
  171. };
  172. typedef struct NSpJoinRequestMessage    NSpJoinRequestMessage;
  173.  
  174. struct NSpJoinApprovedMessage {
  175.     NSpMessageHeader                 header;
  176. };
  177. typedef struct NSpJoinApprovedMessage    NSpJoinApprovedMessage;
  178.  
  179. struct NSpJoinDeniedMessage {
  180.     NSpMessageHeader                 header;
  181.     Str255                             reason;
  182. };
  183. typedef struct NSpJoinDeniedMessage        NSpJoinDeniedMessage;
  184.  
  185. struct NSpPlayerJoinedMessage {
  186.     NSpMessageHeader                 header;
  187.     UInt32                             playerCount;
  188.     NSpPlayerInfo                     playerInfo;
  189. };
  190. typedef struct NSpPlayerJoinedMessage    NSpPlayerJoinedMessage;
  191.  
  192. struct NSpPlayerLeftMessage {
  193.     NSpMessageHeader                 header;
  194.     UInt32                             playerCount;
  195.     NSpPlayerID                     playerID;
  196.     NSpPlayerName                     playerName;
  197. };
  198. typedef struct NSpPlayerLeftMessage        NSpPlayerLeftMessage;
  199.  
  200. struct NSpHostChangedMessage {
  201.     NSpMessageHeader                 header;
  202.     NSpPlayerID                     newHost;
  203. };
  204. typedef struct NSpHostChangedMessage    NSpHostChangedMessage;
  205.  
  206. struct NSpGameTerminatedMessage {
  207.     NSpMessageHeader                 header;
  208. };
  209. typedef struct NSpGameTerminatedMessage    NSpGameTerminatedMessage;
  210.  
  211. struct NSpCreateGroupMessage {
  212.     NSpMessageHeader                 header;
  213.     NSpGroupID                         groupID;
  214.     NSpPlayerID                     requestingPlayer;
  215. };
  216. typedef struct NSpCreateGroupMessage    NSpCreateGroupMessage;
  217.  
  218. struct NSpDeleteGroupMessage {
  219.     NSpMessageHeader                 header;
  220.     NSpGroupID                         groupID;
  221.     NSpPlayerID                     requestingPlayer;
  222. };
  223. typedef struct NSpDeleteGroupMessage    NSpDeleteGroupMessage;
  224.  
  225. struct NSpAddPlayerToGroupMessage {
  226.     NSpMessageHeader                 header;
  227.     NSpGroupID                         group;
  228.     NSpPlayerID                     player;
  229. };
  230. typedef struct NSpAddPlayerToGroupMessage NSpAddPlayerToGroupMessage;
  231.  
  232. struct NSpRemovePlayerFromGroupMessage {
  233.     NSpMessageHeader                 header;
  234.     NSpGroupID                         group;
  235.     NSpPlayerID                     player;
  236. };
  237. typedef struct NSpRemovePlayerFromGroupMessage NSpRemovePlayerFromGroupMessage;
  238.  
  239. struct NSpPlayerTypeChangedMessage {
  240.     NSpMessageHeader                 header;
  241.     NSpPlayerID                     player;
  242.     NSpPlayerType                     newType;
  243. };
  244. typedef struct NSpPlayerTypeChangedMessage NSpPlayerTypeChangedMessage;
  245. /* Different kinds of messages.  These can NOT be bitwise ORed together */
  246. enum {
  247.     kNSpSendFlag_Junk            = 0x00100000,                    /* will be sent (try once) when there is nothing else pending */
  248.     kNSpSendFlag_Normal            = 0x00200000,                    /* will be sent immediately (try once) */
  249.     kNSpSendFlag_Registered        = 0x00400000                    /* will be sent immediately (guaranteed, in order) */
  250. };
  251.  
  252.  
  253. /* Options for message delivery.  These can be bitwise ORed together with each other,
  254.         as well as with ONE of the above */
  255. enum {
  256.     kNSpSendFlag_FailIfPipeFull    = 0x00000001,
  257.     kNSpSendFlag_SelfSend        = 0x00000002,
  258.     kNSpSendFlag_Blocking        = 0x00000004
  259. };
  260.  
  261.  
  262. /* Options for Hosting Joining, and Deleting games */
  263. enum {
  264.     kNSpGameFlag_DontAdvertise    = 0x00000001,
  265.     kNSpGameFlag_ForceTerminateGame = 0x00000002
  266. };
  267.  
  268. /* Message "what" types */
  269. /* Apple reserves all negative "what" values (anything with high bit set) */
  270. enum {
  271.     kNSpSystemMessagePrefix        = (long)0x80000000,
  272.     kNSpError                    = kNSpSystemMessagePrefix | 0x7FFFFFFF,
  273.     kNSpJoinRequest                = kNSpSystemMessagePrefix | 0x00000001,
  274.     kNSpJoinApproved            = kNSpSystemMessagePrefix | 0x00000002,
  275.     kNSpJoinDenied                = kNSpSystemMessagePrefix | 0x00000003,
  276.     kNSpPlayerJoined            = kNSpSystemMessagePrefix | 0x00000004,
  277.     kNSpPlayerLeft                = kNSpSystemMessagePrefix | 0x00000005,
  278.     kNSpHostChanged                = kNSpSystemMessagePrefix | 0x00000006,
  279.     kNSpGameTerminated            = kNSpSystemMessagePrefix | 0x00000007,
  280.     kNSpGroupCreated            = kNSpSystemMessagePrefix | 0x00000008,
  281.     kNSpGroupDeleted            = kNSpSystemMessagePrefix | 0x00000009,
  282.     kNSpPlayerAddedToGroup        = kNSpSystemMessagePrefix | 0x0000000A,
  283.     kNSpPlayerRemovedFromGroup    = kNSpSystemMessagePrefix | 0x0000000B,
  284.     kNSpPlayerTypeChanged        = kNSpSystemMessagePrefix | 0x0000000C
  285. };
  286.  
  287.  
  288. /* Special TPlayerIDs  for sending messages */
  289. enum {
  290.     kNSpAllPlayers                = 0x00000000,
  291.     kNSpHostOnly                = (long)0xFFFFFFFF
  292. };
  293.  
  294.  
  295.  
  296.  
  297. /************************  Initialization  ************************/
  298. EXTERN_API_C( OSStatus )
  299. NSpInitialize                    (UInt32                 inStandardMessageSize,
  300.                                  UInt32                 inBufferSize,
  301.                                  UInt32                 inQElements,
  302.                                  NSpGameID                 inGameID,
  303.                                  UInt32                 inTimeout);
  304.  
  305.  
  306.  
  307.  
  308. /**************************  Protocols  **************************/
  309. /* Programmatic protocol routines */
  310. EXTERN_API_C( OSStatus )
  311. NSpProtocol_New                    (const char *            inDefinitionString,
  312.                                  NSpProtocolReference *    outReference);
  313.  
  314. EXTERN_API_C( void )
  315. NSpProtocol_Dispose                (NSpProtocolReference     inProtocolRef);
  316.  
  317. EXTERN_API_C( OSStatus )
  318. NSpProtocol_ExtractDefinitionString (NSpProtocolReference  inProtocolRef,
  319.                                  char *                    outDefinitionString);
  320.  
  321.  
  322. /* Protocol list routines */
  323. EXTERN_API_C( OSStatus )
  324. NSpProtocolList_New                (NSpProtocolReference     inProtocolRef,
  325.                                  NSpProtocolListReference * outList);
  326.  
  327. EXTERN_API_C( void )
  328. NSpProtocolList_Dispose            (NSpProtocolListReference  inProtocolList);
  329.  
  330. EXTERN_API_C( OSStatus )
  331. NSpProtocolList_Append            (NSpProtocolListReference  inProtocolList,
  332.                                  NSpProtocolReference     inProtocolRef);
  333.  
  334. EXTERN_API_C( OSStatus )
  335. NSpProtocolList_Remove            (NSpProtocolListReference  inProtocolList,
  336.                                  NSpProtocolReference     inProtocolRef);
  337.  
  338. EXTERN_API_C( OSStatus )
  339. NSpProtocolList_RemoveIndexed    (NSpProtocolListReference  inProtocolList,
  340.                                  UInt32                 inIndex);
  341.  
  342. EXTERN_API_C( UInt32 )
  343. NSpProtocolList_GetCount        (NSpProtocolListReference  inProtocolList);
  344.  
  345. EXTERN_API_C( NSpProtocolReference )
  346. NSpProtocolList_GetIndexedRef    (NSpProtocolListReference  inProtocolList,
  347.                                  UInt32                 inIndex);
  348.  
  349.  
  350. /* Helpers */
  351. EXTERN_API_C( NSpProtocolReference )
  352. NSpProtocol_CreateAppleTalk        (ConstStr31Param         inNBPName,
  353.                                  ConstStr31Param         inNBPType,
  354.                                  UInt32                 inMaxRTT,
  355.                                  UInt32                 inMinThruput);
  356.  
  357. EXTERN_API_C( NSpProtocolReference )
  358. NSpProtocol_CreateIP            (InetPort                 inPort,
  359.                                  UInt32                 inMaxRTT,
  360.                                  UInt32                 inMinThruput);
  361.  
  362.  
  363. /***********************  Human Interface  ************************/
  364. typedef CALLBACK_API( Boolean , NSpEventProcPtr )(EventRecord *inEvent);
  365. EXTERN_API_C( NSpAddressReference )
  366. NSpDoModalJoinDialog            (ConstStr31Param         inGameType,
  367.                                  ConstStr255Param         inEntityListLabel,
  368.                                  Str31                     ioName,
  369.                                  Str31                     ioPassword,
  370.                                  NSpEventProcPtr         inEventProcPtr);
  371.  
  372. EXTERN_API_C( Boolean )
  373. NSpDoModalHostDialog            (NSpProtocolListReference  ioProtocolList,
  374.                                  Str31                     ioGameName,
  375.                                  Str31                     ioPlayerName,
  376.                                  Str31                     ioPassword,
  377.                                  NSpEventProcPtr         inEventProcPtr);
  378.  
  379.  
  380. /*********************  Hosting and Joining  **********************/
  381. EXTERN_API_C( OSStatus )
  382. NSpGame_Host                    (NSpGameReference *        outGame,
  383.                                  NSpProtocolListReference  inProtocolList,
  384.                                  UInt32                 inMaxPlayers,
  385.                                  ConstStr31Param         inGameName,
  386.                                  ConstStr31Param         inPassword,
  387.                                  ConstStr31Param         inPlayerName,
  388.                                  NSpPlayerType             inPlayerType,
  389.                                  NSpTopology             inTopology,
  390.                                  NSpFlags                 inFlags);
  391.  
  392. EXTERN_API_C( OSStatus )
  393. NSpGame_Join                    (NSpGameReference *        outGame,
  394.                                  NSpAddressReference     inAddress,
  395.                                  ConstStr31Param         inName,
  396.                                  ConstStr31Param         inPassword,
  397.                                  NSpPlayerType             inType,
  398.                                  void *                    inCustomData,
  399.                                  UInt32                 inCustomDataLen,
  400.                                  NSpFlags                 inFlags);
  401.  
  402. EXTERN_API_C( OSStatus )
  403. NSpGame_EnableAdvertising        (NSpGameReference         inGame,
  404.                                  NSpProtocolReference     inProtocol,
  405.                                  Boolean                 inEnable);
  406.  
  407. EXTERN_API_C( OSStatus )
  408. NSpGame_Dispose                    (NSpGameReference         inGame,
  409.                                  NSpFlags                 inFlags);
  410.  
  411. EXTERN_API_C( OSStatus )
  412. NSpGame_GetInfo                    (NSpGameReference         inGame,
  413.                                  NSpGameInfo *            ioInfo);
  414.  
  415. /**************************  Messaging  **************************/
  416. EXTERN_API_C( OSStatus )
  417. NSpMessage_Send                    (NSpGameReference         inGame,
  418.                                  NSpMessageHeader *        inMessage,
  419.                                  NSpFlags                 inFlags);
  420.  
  421. EXTERN_API_C( NSpMessageHeader *)
  422. NSpMessage_Get                    (NSpGameReference         inGame);
  423.  
  424. EXTERN_API_C( void )
  425. NSpMessage_Release                (NSpGameReference         inGame,
  426.                                  NSpMessageHeader *        inMessage);
  427.  
  428. /* Helpers */
  429. EXTERN_API_C( OSStatus )
  430. NSpMessage_SendTo                (NSpGameReference         inGame,
  431.                                  NSpPlayerID             inTo,
  432.                                  SInt32                 inWhat,
  433.                                  void *                    inData,
  434.                                  UInt32                 inDataLen,
  435.                                  NSpFlags                 inFlags);
  436.  
  437.  
  438. /*********************  Player Information  **********************/
  439. EXTERN_API_C( OSStatus )
  440. NSpPlayer_ChangeType            (NSpGameReference         inGame,
  441.                                  NSpPlayerID             inPlayerID,
  442.                                  NSpPlayerType             inNewType);
  443.  
  444. EXTERN_API_C( OSStatus )
  445. NSpPlayer_Remove                (NSpGameReference         inGame,
  446.                                  NSpPlayerID             inPlayerID);
  447.  
  448. EXTERN_API_C( OSStatus )
  449. NSpPlayer_GetAddress            (NSpGameReference         inGame,
  450.                                  NSpPlayerID             inPlayerID,
  451.                                  OTAddress **            outAddress);
  452.  
  453. EXTERN_API_C( NSpPlayerID )
  454. NSpPlayer_GetMyID                (NSpGameReference         inGame);
  455.  
  456. EXTERN_API_C( OSStatus )
  457. NSpPlayer_GetInfo                (NSpGameReference         inGame,
  458.                                  NSpPlayerID             inPlayerID,
  459.                                  NSpPlayerInfoPtr *        outInfo);
  460.  
  461. EXTERN_API_C( void )
  462. NSpPlayer_ReleaseInfo            (NSpGameReference         inGame,
  463.                                  NSpPlayerInfoPtr         inInfo);
  464.  
  465. EXTERN_API_C( OSStatus )
  466. NSpPlayer_GetEnumeration        (NSpGameReference         inGame,
  467.                                  NSpPlayerEnumerationPtr * outPlayers);
  468.  
  469. EXTERN_API_C( void )
  470. NSpPlayer_ReleaseEnumeration    (NSpGameReference         inGame,
  471.                                  NSpPlayerEnumerationPtr  inPlayers);
  472.  
  473. EXTERN_API_C( UInt32 )
  474. NSpPlayer_GetRoundTripTime        (NSpGameReference         inGame,
  475.                                  NSpPlayerID             inPlayer);
  476.  
  477. EXTERN_API_C( UInt32 )
  478. NSpPlayer_GetThruput            (NSpGameReference         inGame,
  479.                                  NSpPlayerID             inPlayer);
  480.  
  481.  
  482. /*********************  Group Management  **********************/
  483. EXTERN_API_C( OSStatus )
  484. NSpGroup_New                    (NSpGameReference         inGame,
  485.                                  NSpGroupID *            outGroupID);
  486.  
  487. EXTERN_API_C( OSStatus )
  488. NSpGroup_Dispose                (NSpGameReference         inGame,
  489.                                  NSpGroupID             inGroupID);
  490.  
  491. EXTERN_API_C( OSStatus )
  492. NSpGroup_AddPlayer                (NSpGameReference         inGame,
  493.                                  NSpGroupID             inGroupID,
  494.                                  NSpPlayerID             inPlayerID);
  495.  
  496. EXTERN_API_C( OSStatus )
  497. NSpGroup_RemovePlayer            (NSpGameReference         inGame,
  498.                                  NSpGroupID             inGroupID,
  499.                                  NSpPlayerID             inPlayerID);
  500.  
  501. EXTERN_API_C( OSStatus )
  502. NSpGroup_GetInfo                (NSpGameReference         inGame,
  503.                                  NSpGroupID             inGroupID,
  504.                                  NSpGroupInfoPtr *        outInfo);
  505.  
  506. EXTERN_API_C( void )
  507. NSpGroup_ReleaseInfo            (NSpGameReference         inGame,
  508.                                  NSpGroupInfoPtr         inInfo);
  509.  
  510. EXTERN_API_C( OSStatus )
  511. NSpGroup_GetEnumeration            (NSpGameReference         inGame,
  512.                                  NSpGroupEnumerationPtr * outGroups);
  513.  
  514. EXTERN_API_C( void )
  515. NSpGroup_ReleaseEnumeration        (NSpGameReference         inGame,
  516.                                  NSpGroupEnumerationPtr  inGroups);
  517.  
  518.  
  519. /**************************  Utilities  ***************************/
  520. EXTERN_API_C( NumVersion )
  521. NSpGetVersion                    (void);
  522.  
  523. EXTERN_API_C( void )
  524. NSpSetConnectTimeout            (UInt32                 inSeconds);
  525.  
  526. EXTERN_API_C( void )
  527. NSpClearMessageHeader            (NSpMessageHeader *        inMessage);
  528.  
  529. EXTERN_API_C( UInt32 )
  530. NSpGetCurrentTimeStamp            (NSpGameReference         inGame);
  531.  
  532. EXTERN_API_C( NSpAddressReference )
  533. NSpConvertOTAddrToAddressReference (OTAddress *            inAddress);
  534.  
  535. EXTERN_API_C( OTAddress *)
  536. NSpConvertAddressReferenceToOTAddr (NSpAddressReference  inAddress);
  537.  
  538. EXTERN_API_C( void )
  539. NSpReleaseAddressReference        (NSpAddressReference     inAddress);
  540.  
  541.  
  542. /************************ Advanced/Async routines ****************/
  543. typedef CALLBACK_API( void , NSpCallbackProcPtr )(NSpGameReference inGame, void *inContext, NSpEventCode inCode, OSStatus inStatus, void *inCookie);
  544. EXTERN_API_C( OSStatus )
  545. NSpInstallCallbackHandler        (NSpCallbackProcPtr     inHandler,
  546.                                  void *                    inContext);
  547.  
  548.  
  549. typedef CALLBACK_API( Boolean , NSpJoinRequestHandlerProcPtr )(NSpGameReference inGame, NSpJoinRequestMessage *inMessage, void *inContext, Str255 outReason);
  550. EXTERN_API_C( OSStatus )
  551. NSpInstallJoinRequestHandler    (NSpJoinRequestHandlerProcPtr  inHandler,
  552.                                  void *                    inContext);
  553.  
  554.  
  555. typedef CALLBACK_API( Boolean , NSpMessageHandlerProcPtr )(NSpGameReference inGame, NSpMessageHeader *inMessage, void *inContext);
  556. EXTERN_API_C( OSStatus )
  557. NSpInstallAsyncMessageHandler    (NSpMessageHandlerProcPtr  inHandler,
  558.                                  void *                    inContext);
  559.  
  560.  
  561.  
  562. #endif  /* TARGET_OS_MAC */
  563.  
  564.  
  565. #if PRAGMA_STRUCT_ALIGN
  566.     #pragma options align=reset
  567. #elif PRAGMA_STRUCT_PACKPUSH
  568.     #pragma pack(pop)
  569. #elif PRAGMA_STRUCT_PACK
  570.     #pragma pack()
  571. #endif
  572.  
  573. #ifdef PRAGMA_IMPORT_OFF
  574. #pragma import off
  575. #elif PRAGMA_IMPORT
  576. #pragma import reset
  577. #endif
  578.  
  579. #ifdef __cplusplus
  580. }
  581. #endif
  582.  
  583. #endif /* __NETSPROCKET__ */
  584.  
  585.